<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>layui-由www.magicalcoder.com可视化布局器生成</title>
    <link href="https://cdn.jsdelivr.net/npm/layui-src@2.4.5/dist/css/layui.css" rel="stylesheet"/>
    <link href="http://lowcode.magicalcoder.com/magicalcoder/assets/drag/ui/magicalcoder/1.1.0/magicalcoder.css" rel="stylesheet"/>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/json3/3.3.3/json3.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/echarts/4.6.0/echarts.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/echarts/4.6.0/extension/dataTool.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/layui-src@2.4.5/dist/layui.all.js"></script>
    <script src="http://www.magicalcoder.com/assets/js/common.js"></script>
    <script src="http://lowcode.magicalcoder.com/magicalcoder/assets/drag/ui/magicalcoder/1.1.0/magicalcoder.js"></script>
</head>
<body class="testbody">
<dd class="main_left"><a  data-src="/login"  target="_top" >学生列表</a></dd>
<dd class="main_left"><a data-src="/test1" target="_top">班级列表</a></dd>
<dd class="main_left"><a data-src="/userlist2" target="_top">用户列表</a></dd>
<div>
    <table id="stutable" class="table_test">
        <!--/*@thymesVar id="users" type="com"*/-->
        <tr th:each="user:${users}">
            <th users.username></th>
        </tr>
    </table>
    <button onclick="ajaxrqs">ajaxtest</button>
</div>
<div class="main_right">
    <iframe frameborder="0" scrolling="yes" style="width: 100%" src="" id="aa">
    </iframe>
</div>
<div id="magicalDragScene" class="mc-root mc-ui-absolute-pane">
    <div class="magical-coder-tmp" style="position:absolute;left:3.82054%;top:28.5707%;width:100%" > <div class="magicalcoder-table" style="" mc-attr-bool-loading="false" mc-attr-str-url="http://127.0.0.1:8081/Test" mc-attr-str-toolbar="#tableToolbar" mc-attr-json-default-toolbar="[&quot;filter&quot;,&quot;exports&quot;,&quot;print&quot;]">
        <div id="tableToolbar" class="magicalcoder-table-tool-bar layui-hide">
            <div class="layui-inline" lay-event="add">
                <i class="layui-icon layui-icon-add-1"></i>
            </div>
            <div class="layui-inline" lay-event="update">
                <i class="layui-icon layui-icon-edit"></i>
            </div>
            <div class="layui-inline" lay-event="delete">啊</div>
        </div>
        <span class="magicalcoder-table-th layui-hide" mc-attr-str-field="id">ID</span>
        <span class="magicalcoder-table-th layui-hide" mc-attr-str-field="name">名称</span>
        <span class="magicalcoder-table-th layui-hide" mc-attr-str-field="description">简介</span>
        <span class="magicalcoder-table-th layui-hide" mc-attr-str-toolbar="#tableColToolbar">操作</span>
        <div id="tableColToolbar" class="magicalcoder-table-col-tool-bar layui-hide">
            <a class="layui-btn layui-btn-xs" lay-event="detail">查看</a>
            <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
            <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
        </div>
    </div></div>
</div>
<script>
    var $=layui.jquery;
    var table=layui.table;
 /*   $(function (){
        $(document).on('onload','#stutable',function (data) {
            var xmlhtttp=new XMLHttpRequest();
            xmlhtttp.open("POST","/test1",true);
        })
    })*/

    function ajaxrqs(){
        var xmlhtp=new XMLHttpRequest();
        xmlhtp.open("GET","localhost:8081/test1",true);
    }
    $(function(){
        //获取src值
        $(".main_left a").on("click",function(){
            var address =$(this).attr("data-src");
            $("iframe").attr("src",address);
        });
        $(".testbody").on("onload",function (){
            var te=$(this).attr("/test1");

        })
        //一下代码是根据窗口高度在设置iframe的高度
        var frame = $("#aa");

        var frameheight = $(window).height();
        console.log(frameheight);
        frame.css("height",frameheight);
        $()
    });
</script>
</body>
</html>